﻿using System;
using System.Activities;
using System.Collections.Generic;
using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Headsight.BPMN2WF.WF.Activities
{
    [TestClass]
    public class UserTaskTest
    {
        [TestMethod]
        public void Execute()
        {
            var sw = new StringWriter();
            Console.SetOut(sw);


            var argsIn = new Dictionary<String, Object>();
            argsIn["Text"] = "textValue";
            argsIn["EncodedParameters"] = "textValue";

            WorkflowInvoker.Invoke(new UserTask(), argsIn);

            Assert.IsTrue(sw.GetStringBuilder().ToString().Contains("UserTask: textValue"));
        }
    }
}
